#!/usr/bin/env python

from PIL import Image

image = Image.open('cave.jpg')
width, height = image.size
for x in range(width):
    for y in range(height):
        if (x + y) % 2 == 0:
            pass
        else:
            image.putpixel((x, y), (0, 0, 0))
image.save('cave_filter.jpg', 'JPEG')

